package com.um.jdy.common.shop.service;

import com.um.springboot.starter.orm.service.BaseEntityService;
import com.um.jdy.common.shop.entity.po.GoodsOption;

import java.util.List;

/**
 * 服务接口：规格组合表
 */
public interface GoodsOptionService extends BaseEntityService<GoodsOption> {


    /**
     * 增加库存
     * @param mallGoodsOptionId
     * @param count
     * @return
     */
    boolean addStock(String mallGoodsOptionId,int count);

    /**
     * 减少库存
     * @param mallGoodsOptionId
     * @param count
     * @return
     */
    boolean reduceStock(String mallGoodsOptionId,int count);

    /**
     * 减少库存 （乐观锁的方式）
     * @param marketActivityGoodsOptionId
     * @param count
     * @return
     */
    boolean reduceActivityStock(String marketActivityGoodsOptionId, int count);

    /**
     * 增加库存
     *
     * @param marketActivityGoodsOptionId
     * @param count
     * @return
     */
    boolean addActivityStock(String marketActivityGoodsOptionId, int count);

}
